package com.bang.consumer.controller;

import com.bang.ticker.service.HelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: Bang
 * @Date: 2019/11/26 21:31
 * @Description:
 */
@RestController
public class HelloController {

    @Reference(version = "${demo.service.version}")
    private HelloService helloService;


    @GetMapping("/hello")
    public Object hello(@RequestParam String msg) {
        String sayHello = helloService.sayHello(msg);
        System.err.println(sayHello);
        return sayHello;
    }
}
